import { createAPI } from '@/utils/request'

// 面试技巧
export const getArticlesListRequest = data => createAPI('/articles', 'get', data)
// 文章添加
export const addArticlesRequest = data => createAPI('/articles', 'post', data)

//
// 查看详情
export const getArticlesDetailRequest = (id) => createAPI(`/articles/${id}`, 'get')
// 修改

export const editArticlesRequest = (data) => createAPI(`/articles/${data.id}`, 'PUT', data)

// 文章状态
// /articles/:id/:state
export const stateArticlesRequest = (data) => createAPI(`/articles/${data.id}/${data.state}`, 'post', data)
// 删除

export const delSkillRequest = (id) => createAPI(`/articles/${id}`, 'delete')
